package com.nine.service;

import java.sql.Timestamp;
import java.util.Date;
import java.util.List;
import java.util.Set;
import org.hibernate.LockMode;
import org.springframework.context.ApplicationContext;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.nine.IService.CustomerService;
import com.nine.IService.OrderService;
import com.nine.dao.OrderDAO;
import com.nine.entity.Order;

/**
 * A data access object (DAO) providing persistence and search support for Order
 * entities. Transaction control of the save(), update() and delete() operations
 * can directly support Spring container-managed transactions or they can be
 * augmented to handle user-managed Spring transactions. Each of these methods
 * provides additional information for how to configure it for the desired type
 * of transaction control.
 * 
 * @see com.nine.entity.Order
 * @author MyEclipse Persistence Tools
 */

public class OrderServiceImpl implements OrderService {
OrderDAO orderDao;

	public OrderDAO getOrderDao() {
	return orderDao;
}

public void setOrderDao(OrderDAO orderDao) {
	this.orderDao = orderDao;
}

	public Order checkOrder(int orderId) {
		// TODO Auto-generated method stub
		return null;
	}

	public boolean checkRelation(String customerId) {
		// TODO Auto-generated method stub
		return false;
	}

	public Order getOrder(String customerId, int orderId) {
		// TODO Auto-generated method stub
		return null;
	}

	public List<Order> getOrderId(String beginTime, String endTime,
			int categoryId) {
		// TODO Auto-generated method stub
		return null;
	}

//	public List<Order> getOrderList(String customerId, String beginDate,
//			String endDate, int isPay) {
//		// TODO Auto-generated method stub
//		return null;
//	}

	public List<Order> getOrderList(int orderId, String customerId,
			String orderTime) {
		// TODO Auto-generated method stub
		return null;
	}

	public boolean insertOrder(Order order) {
		// TODO Auto-generated method stub
		return false;
	}

	public List<Order> refreshOrderList(Order order) {
		// TODO Auto-generated method stub
		return null;
	}

	public boolean updateAccount(String customerId, int point) {
		// TODO Auto-generated method stub
		return false;
	}
	public List<Order> getOrderList(String customerId, String beginDate,
			String endDate, int isPay) {
		// TODO Auto-generated method stub
		List<Order> orderList=orderDao.findByCondiction( customerId, beginDate, endDate, isPay);
		return orderList;
	}

	public Order getOrder(int orderId) {
		// TODO Auto-generated method stub
		return orderDao.findById(orderId);
	}

	public List<Order> getOrderList(String customerId) {
		// TODO Auto-generated method stub
		return orderDao.findByCustomerId(customerId);
	}

	


}